import request from '@/utils/request'
import { addCampusIdToQuery } from '@/api/home/management'

// 查询品牌推荐列表
export function listRecommendations(query) {
  return request({
    url: '/recommendations/recommendations/list',
    method: 'get',
    params: addCampusIdToQuery(query)
  })
}

// 查询品牌推荐详细
export function getRecommendations(id) {
  return request({
    url: '/recommendations/recommendations/' + id,
    method: 'get'
  })
}

// 新增品牌推荐
export function addRecommendations(data) {
  return request({
    url: '/recommendations/recommendations',
    method: 'post',
    data: data
  })
}

// 修改品牌推荐
export function updateRecommendations(data) {
  return request({
    url: '/recommendations/recommendations',
    method: 'put',
    data: data
  })
}

// 删除品牌推荐
export function delRecommendations(id) {
  return request({
    url: '/recommendations/recommendations/' + id,
    method: 'delete'
  })
}
